# datetime是Python处理日期和时间的标准库。
#datetime是模块，datetime模块还包含一个datetime类，
#timestamp

from datetime import datetime
dt=datetime(2016,7,1,15,35)
dts=dt.timestamp()
print(dt)
print(dts)
print(datetime.fromtimestamp(dts))
print(datetime.utcfromtimestamp(dts))

#str to datetime

tday=datetime.strptime('2016-7-1 15:47:02','%Y-%m-%d %H:%M:%S')
print(tday)

print(tday.strftime('%a, %b %d %H:%M:%S'))
